﻿using System;
using System.Configuration;
using System.Linq;
using db = DataContext;

namespace WebApplication
{
	public partial class Index : System.Web.UI.Page
	{
		public int interval = 6000;

		protected void Page_Load(object sender, EventArgs e)
		{
			interval = int.Parse(ConfigurationManager.AppSettings["play_interval"]);

			using (db.DbDataContext context = new db.DbDataContext())
			{
				ipic.DataSource = context.IndexPictures.OrderBy(x => x.Sort);
				ipic.DataBind();
			}
		}
	}
}